#ifndef __GAME_SCENE_H__
#define __GAME_SCENE_H__

#include "cocos2d.h"
#include "../include/IGameScene.h"
#include <vector>
#include "SceneObject.h"
namespace fishingjoy
{
	namespace scene
	{
		class CGameScene : public cocos2d::CCLayer,public IGameScene
		{
			std::vector<CSceneObject*> m_vecObjectsList;
			cocos2d::CCSprite* m_pBg;
			cocos2d::CCLayer *m_pBgLayer;
			cocos2d::CCLayer *m_pObjectLayer;
		public:
			CGameScene():m_pBg(NULL)
			{
				m_pBgLayer = CCLayer::create();
				addChild(m_pBgLayer);

				m_pObjectLayer = CCLayer::create();
				addChild(m_pObjectLayer);
			}
		public:
			virtual void setSceneInfo(int w,int h,int extend);
			virtual void attachTo(cocos2d::CCNode* node);
			//
			virtual void setBackground(const char* pFile);

			virtual ISceneObject* createObject(int tid);
			
			virtual void destroyObject(ISceneObject* pObj);

			virtual void update(float dt);
		public:
			CREATE_FUNC(CGameScene);
		};

	}
}
#endif  // __HELLOWORLD_SCENE_H__